home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 2 (DVD) / XENIADVD2.iso / Patch / Project Nomads / pnomads_patch2_eng.exe / MAINDIR / Run / scripts / statewatcher / silo.tcl < prev    next >
Encoding:
Text File  |  2002-09-29  |  3.3 KB  |  134 lines

  1. #
  2. #   Zustands-â–„berwachungs-Script
  3. #   State Watch Script
  4. #
  5. #   Silo
  6. #
  7. #   created:    15-Jun-2000 Bernd
  8. #   
  9. #   (C) COPYRIGHT 2000 RADONLABS GMBH
  10. #
  11. # --------------------------------------------------------
  12. #                     S I L O
  13. # --------------------------------------------------------
  14. proc silowatch_normal {} {
  15.  
  16.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  17.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  18.     if {[.getartefactmode] == "false"} {
  19.         .announcestate house
  20.     } elseif {[.iscollected] == "true"} {
  21.         .announcestate backpack
  22.     } elseif {[.getcharges] <= 0} {
  23.         .setremoveable true
  24.     } elseif {[.getcreator] != "null"} {
  25.         .announcestate infactoryslot
  26.     }
  27. }
  28.  
  29. proc silowatch_infactoryslot {} {
  30.  
  31.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  32.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  33.     if {[.getartefactmode] == "false"} {
  34.         .announcestate house
  35.     } elseif {[.iscollected] == "true"} {
  36.         .announcestate backpack
  37.     } elseif {[.getcharges] <= 0} {
  38.         .setremoveable true
  39.     } elseif {[.getcreator] == "null"} {
  40.         .announcestate normal
  41.     }
  42. }
  43.  
  44. proc silowatch_bauphase {} {
  45.  
  46.     # kann zerstoert oder wieder zusammengeklappt werden
  47.     if {[.iskilled] == "true"} {
  48.         .announcestate explode
  49.     } elseif {[.getartefactmode] == "true"} {
  50.         .announcestate normal
  51.     } elseif {[.isstatetimeover] == "true"} {
  52.         .announcestate house
  53.     }
  54. }
  55.  
  56. proc silowatch_house {} {
  57.  
  58.     # kann zerstoert oder wieder zusammengeklappt werden
  59.     if {[.iskilled] == "true"} {
  60.         .announcestate explode
  61.     } elseif {[.getartefactmode] == "true"} {
  62.         .announcestate normal
  63.     } elseif {[.removebuilding] == "true"} {
  64.         .announcestate remove
  65.     }
  66. }
  67.  
  68. proc silowatch_explode {} {
  69.  
  70.     # Uebergang zum Artefakt oder Wegnehmen, wenn die Charges 
  71.     # aufgebraucht sind
  72.     if {[.isanimfinished] == "true"} {
  73.         if {[.getcharges] <= 0} {
  74.             .setremoveable true
  75.         } else {
  76.             .announcestate normal
  77.         .removefromisland
  78.         }
  79.     }
  80. }
  81.  
  82. proc silowatch_remove {} {
  83.  
  84.     # Uebergang zum Artefakt oder Wegnehmen, wenn die Charges 
  85.     # aufgebraucht sind
  86.     if {[.isanimfinished] == "true"} {
  87.         if {[.getcharges] <= 0} {
  88.             .setremoveable true
  89.         } else {
  90.             .announcestate normal
  91.         .removefromisland
  92.         }
  93.     }
  94. }
  95.  
  96. proc silowatch_backpack {} {
  97.  
  98.     # Moeglich: usgeworfen (Nicht mehr "gesammelt") oder im
  99.     # Menue gezeigt (sichtbar)
  100.     if {[.iscollected] == "false"} {
  101.         .announcestate normal
  102.     } elseif {[.isvisible] == "true"} {
  103.         .announcestate menue
  104.     }
  105. }
  106.  
  107. proc silowatch_menu {} {
  108.  
  109.     if {[.isvisible] == "false"} {
  110.         .announcestate backpack
  111.     } elseif {[.getartefactuse] == "true"} {
  112.         .announcestate build
  113.     } elseif {[.iscollected] == "false"} {
  114.         .announcestate normal
  115.     }
  116. }
  117.  
  118. proc silowatch_build {} {
  119.  
  120.     if {[.iskilled] == "true"} {
  121.         .announcestate explode
  122.     } elseif {[.getartefactmode] == "false"} {
  123.         .announcestate bauphase
  124.     } elseif {[.getartefactuse] == "false"} {
  125.         .announcestate backpack
  126.     }
  127. }
  128.  
  129. proc silowatch_cinematic {} {
  130.  
  131.     # empty
  132. }    
  133.  
  134.